/*
 * chassis.h
 *
 *  Created on: Nov 19, 2021
 *      Author: zz
 */

#ifndef APP_CHASSIS_H_
#define APP_CHASSIS_H_


#include "main.h"

typedef enum {
	GEAR_NEUTRAL,
	GEAR_DRIVE,
	GEAR_REVERSE,
	GEAR_PARKING
}Gear;

struct Chassis{
	Gear gear;
	int  throttle_percentage;
	int  brake_percentage;		// un used
	int  rpm;
	int  steering_percent;

	double  throttle_ratio;		// throttle实际值为 percent*ratio+offset，根据控制器决定
	double  throttle_offset;
	double  steering_offset;    // sheering实际设置值为 percent*ratio+offset，根据舵机情况校准比例及偏移
	double  steering_ratio;

};


#endif /* APP_CHASSIS_H_ */
